package com.antcom.antread.api.service;

import com.antcom.antread.api.domain.OperationLog;
import com.antcom.antread.api.factory.RemoteLogFallbackFactory;
import com.antcom.antread.common.core.constant.ModuleConstant;
import com.antcom.antread.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 远程调用api
 *
 * @Author 中国蚂蚁技术有限公司
 * @create 2020/12/27 21:09
 */
@Service
@FeignClient(contextId = "remoteLogService",value = ModuleConstant.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class,path = "/logger/aspect")
public interface RemoteLogService {
    /**
     * 保存系统日志
     *
     * @param operationLog 日志实体
     * @return 结果
     */
    @PostMapping("/recordLogger")
    R<Boolean> saveLog(@RequestBody OperationLog operationLog);

}
